import codecs
import csv

import xlrd


def main(xlsx_path, csv_path):
    workbook = xlrd.open_workbook(xlsx_path)
    table = workbook.sheet_by_index(0)
    with codecs.open(csv_path, 'a', encoding='utf-8') as f:
        write = csv.writer(f)
        for row_num in range(1, table.nrows):
            row_value = table.row_values(row_num)
            write.writerow(row_value)
